package com.stringbuilder;

import java.util.Arrays;
import java.util.List;

public class StringBuilderDemo1 {
public static void main(String[] args) {
	List<String> names=Arrays.asList("deepak","kumar","goswami","amit");
	String getNames=listToString(names);
	System.out.println(getNames);
}
public static String listToString(List<String> list){
	//StringBuilder builder=new StringBuilder();
	String s="";
	for(String element:list){
		//builder.append(element).append(" ");
		s=s+element+" ";
	}
	//return builder.toString();
	return s;
}
}
